3.155 \(\int \csc ^3(e+f x) (a+b \sin (e+f x)) \, dx\)

Optimal. Leaf size=48 \[ -\frac{a \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac{a \cot (e+f x) \csc (e+f x)}{2 f}-\frac{b \cot (e+f x)}{f} \]

[Out]

-(a*ArcTanh[Cos[e + f*x]])/(2*f) - (b*Cot[e + f*x])/f - (a*Cot[e + f*x]*Csc[e + f*x])/(2*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0470495, antiderivative size = 48, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.263, Rules used = {2748, 3768, 3770, 3767, 8} \[ -\frac{a \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac{a \cot (e+f x) \csc (e+f x)}{2 f}-\frac{b \cot (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^3*(a + b*Sin[e + f*x]),x]

[Out]

-(a*ArcTanh[Cos[e + f*x]])/(2*f) - (b*Cot[e + f*x])/f - (a*Cot[e + f*x]*Csc[e + f*x])/(2*f)

Rule 2748

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c, Int[(b*S
in[e + f*x])^m, x], x] + Dist[d/b, Int[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \csc ^3(e+f x) (a+b \sin (e+f x)) \, dx &=a \int \csc ^3(e+f x) \, dx+b \int \csc ^2(e+f x) \, dx\\ &=-\frac{a \cot (e+f x) \csc (e+f x)}{2 f}+\frac{1}{2} a \int \csc (e+f x) \, dx-\frac{b \operatorname{Subst}(\int 1 \, dx,x,\cot (e+f x))}{f}\\ &=-\frac{a \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac{b \cot (e+f x)}{f}-\frac{a \cot (e+f x) \csc (e+f x)}{2 f}\\ \end{align*}

Mathematica [A]  time = 0.0279821, size = 91, normalized size = 1.9 \[ -\frac{a \csc ^2\left (\frac{1}{2} (e+f x)\right )}{8 f}+\frac{a \sec ^2\left (\frac{1}{2} (e+f x)\right )}{8 f}+\frac{a \log \left (\sin \left (\frac{1}{2} (e+f x)\right )\right )}{2 f}-\frac{a \log \left (\cos \left (\frac{1}{2} (e+f x)\right )\right )}{2 f}-\frac{b \cot (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^3*(a + b*Sin[e + f*x]),x]

[Out]

-((b*Cot[e + f*x])/f) - (a*Csc[(e + f*x)/2]^2)/(8*f) - (a*Log[Cos[(e + f*x)/2]])/(2*f) + (a*Log[Sin[(e + f*x)/
2]])/(2*f) + (a*Sec[(e + f*x)/2]^2)/(8*f)

________________________________________________________________________________________

Maple [A]  time = 0.089, size = 54, normalized size = 1.1 \begin{align*} -{\frac{\cot \left ( fx+e \right ) a\csc \left ( fx+e \right ) }{2\,f}}+{\frac{a\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{2\,f}}-{\frac{b\cot \left ( fx+e \right ) }{f}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^3*(a+b*sin(f*x+e)),x)

[Out]

-1/2*a*cot(f*x+e)*csc(f*x+e)/f+1/2/f*a*ln(csc(f*x+e)-cot(f*x+e))-b*cot(f*x+e)/f

________________________________________________________________________________________

Maxima [A]  time = 1.61466, size = 81, normalized size = 1.69 \begin{align*} \frac{a{\left (\frac{2 \, \cos \left (f x + e\right )}{\cos \left (f x + e\right )^{2} - 1} - \log \left (\cos \left (f x + e\right ) + 1\right ) + \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - \frac{4 \, b}{\tan \left (f x + e\right )}}{4 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^3*(a+b*sin(f*x+e)),x, algorithm="maxima")

[Out]

1/4*(a*(2*cos(f*x + e)/(cos(f*x + e)^2 - 1) - log(cos(f*x + e) + 1) + log(cos(f*x + e) - 1)) - 4*b/tan(f*x + e
))/f

________________________________________________________________________________________

Fricas [B]  time = 1.74508, size = 251, normalized size = 5.23 \begin{align*} \frac{4 \, b \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 2 \, a \cos \left (f x + e\right ) -{\left (a \cos \left (f x + e\right )^{2} - a\right )} \log \left (\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) +{\left (a \cos \left (f x + e\right )^{2} - a\right )} \log \left (-\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right )}{4 \,{\left (f \cos \left (f x + e\right )^{2} - f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^3*(a+b*sin(f*x+e)),x, algorithm="fricas")

[Out]

1/4*(4*b*cos(f*x + e)*sin(f*x + e) + 2*a*cos(f*x + e) - (a*cos(f*x + e)^2 - a)*log(1/2*cos(f*x + e) + 1/2) + (
a*cos(f*x + e)^2 - a)*log(-1/2*cos(f*x + e) + 1/2))/(f*cos(f*x + e)^2 - f)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sin{\left (e + f x \right )}\right ) \csc ^{3}{\left (e + f x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**3*(a+b*sin(f*x+e)),x)

[Out]

Integral((a + b*sin(e + f*x))*csc(e + f*x)**3, x)

________________________________________________________________________________________

Giac [B]  time = 2.05635, size = 124, normalized size = 2.58 \begin{align*} \frac{a \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 4 \, a \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) \right |}\right ) + 4 \, b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - \frac{6 \, a \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 4 \, b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + a}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2}}}{8 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^3*(a+b*sin(f*x+e)),x, algorithm="giac")

[Out]

1/8*(a*tan(1/2*f*x + 1/2*e)^2 + 4*a*log(abs(tan(1/2*f*x + 1/2*e))) + 4*b*tan(1/2*f*x + 1/2*e) - (6*a*tan(1/2*f
*x + 1/2*e)^2 + 4*b*tan(1/2*f*x + 1/2*e) + a)/tan(1/2*f*x + 1/2*e)^2)/f